<?php
/**
 * This is the template for action id `delete`.
 */

/** @var yii\web\View $this */
/** @var \console\gii\controller\Generator $generator */
/** @var string $actionCamelID */
/** @var string $controllerName */
/** @var string $modelName */
$modelName = $generator->modelName;
?>
        $bodyParams = $this->post;
        if (empty($bodyParams['id']) || !is_numeric($bodyParams['id'])) return $this->asFail('参数缺失:id');
        <?= $modelName ?>::deleteAll(['id' => $bodyParams['id']]);

        return $this->asOk('删除成功' . "#{$bodyParams['id']}");
